﻿#ifndef TCPCODEC_USER_H
#define TCPCODEC_USER_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "TcpCodecBase.h"

class TcpCodec;
class UserInfoCodec;
class TcpCodec_User : public QObject,public ObjAutoInject,public TcpCodecBase
{
  Q_OBJECT
public:
  enum {
    AllDevice=0
  };
private://dependency
  TcpCodec* tcpCodec=Q_NULLPTR;
  UserInfoCodec* userInfoCodec=Q_NULLPTR;
public:
  explicit TcpCodec_User();
  virtual ~TcpCodec_User();
signals:
public:
  virtual void decode(DataPackage_TcpCodec* dataPackageInfo_User)override;
public://geter and seter
  TcpCodec* getTcpCodec()const;
  TcpCodec_User* setTcpCodec(TcpCodec* const tcpCodec);
  UserInfoCodec* getUserInfoCodec()const;
  TcpCodec_User* setUserInfoCodec(UserInfoCodec* const userInfoCodec);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // TCPCODEC_USER_H
